// url: '/system/dict/data/type/' + dictType,

import { request } from "@umijs/max";

// 获取字典数据列表
export async function getDicts(
  dictType: string,
  options?: { [key: string]: any }
) {
  return request<API.DictDataList>("/api/system/dict/data/type/" + dictType, {
    method: "GET",
    ...(options || {}),
  });
}
// url: '/system/user/' + parseStrEmpty(userId),

export async function getSystemUserInfo(
  userId?: string | number,
  options?: { [key: string]: any }
) {
  return request<API.UserInfo>("/api/system/user/" + userId, {
    method: "GET",
    ...(options || {}),
  });
}

// /api/system/menu/treeselect
export async function getMenuTreeSelect(options?: { [key: string]: any }) {
  return request<API.MenuTreeSelect>("/api/system/menu/treeselect", {
    method: "GET",
    ...(options || {}),
  });
}
